#ifndef RACK_H
#define RACK_H


class Rack
{
    public:
        Rack();
        double c2rRatio;                // no of readings in 1 
        void setMean(double x);
        void setPwm(int pwm);
        void attachMotor(int dir1,int dir2, int pwm);
        void attachVariac(int pinNo);
        void moveAbsolute(int x);
        void moveRelative(int x);
        void moveCmAbsolute(int cm);
        void moveCmRelative(int cm);
        void setAsMean();
        int isMoving();
        int position();
        void stop();
    protected:
    private:
        double mean;
        double curPos;
        int pin;        //pin on which encoder value is read;
        int movingStatus;
        int dir1;
        int dir2;
        int pwm;
        int pwmPin;
};

#endif // RACK_H
